#ifndef PAGENETWORK_H
#define PAGENETWORK_H

#include <QWidget>
#include <QLabel>
#include "global_def.h"

namespace Ui {
    class PageNetwork;
}

class PageNetwork : public QWidget
{
    Q_OBJECT

public:
    explicit PageNetwork(int type,QWidget *parent = 0);
    ~PageNetwork();
    enum
    {
        TOPO_FCU,
        TOPO_ECR,
        TOPO_ATC,
        TOPO_VCU,
        TOPO_VSCU,
        TOPO_DDU,
        TOPO_RIOM10,
        TOPO_EVR,
        TOPO_HVAC,
        TOPO_BCU,
        TOPO_EDCU,
        TOPO_PIC,
        TOPO_BMS,
        TOPO_ACE,
        TOPO_TCDS,
        TOPO_LCU,
        TOPO_PCE,
        TOPO_ICDS,
        TOPO_COUNT
    };
    void setDeviceComStatus(int dev, int index, bool flt, bool master=0);
    bool getATCComFlt(int i);
    void setTCDSVisible(bool xVisible);
private:
    Ui::PageNetwork *ui;
    QList<QLabel*> vculist, vsculist, ddulist, riom10list, acelist, tcdslist, lculist, pcelist, icdslist;
    QList<QLabel*> fculist, ecrlist, atclist, evrlist, hvaclist, bculist, edculist, piclist, bmslist;
    QList< QList<QLabel*> > devlist;
    bool xATCComFlt[2];
private:
    void change_to_type(int type);
    int net_type_=Network_BlueAndRed;
};

#endif // PAGENETWORK_H
